import java.util.ArrayList;

import com.game.rule.Rule;


public class test {

	static void fapai(ArrayList<Integer> cardList) {
		ArrayList<Integer> spList = new ArrayList<Integer>();
		for (int i = 0; i < 6; i++) {
			int card = cardList.remove(0);
			spList.add(card);
			
			if (spList.size() == 1 || spList.size() == 3) {

			} else if (spList.size() == 2) {

			} else if (spList.size() == 4) {

				//判断是否增牌
				int addType = Rule.getAddType(spList);
				if (addType == 0) {
					spList.add(0);
					spList.add(0);
					return;
				} else if (addType == 2) {
					spList.add(0);
				}
			} else if (spList.size() == 5) {
				//判断是否增牌
				int addType = Rule.getAddType(spList);
				if (addType == 0) {
					spList.add(0);
					return;
				}
			} else if (spList.size() == 6) {
				return;
			}
		}
	}
	
	public static void main(String[] args) {
		ArrayList<Integer> cardList = new ArrayList<Integer>();
		cardList.add(105);
		cardList.add(109);
		cardList.add(110);
		cardList.add(105);
		cardList.add(105);
		cardList.add(130);
		cardList.add(131);
		cardList.add(132);
		
		fapai(cardList);
	}
}
